"""生产者"""
import pika

#1、创建证书
credentials = pika.PlainCredentials("admin","123456Aa")

#2、连接MQ服务器
conn_param = pika.ConnectionParameters("192.168.10.161",credentials=credentials)
mq_conn = pika.BlockingConnection(conn_param)

#3、创建通道
mq_channel = mq_conn.channel()

#4、通道取名
mq_channel.queue_declare(queue="jzc")

#5、生产消息
mq_channel.basic_publish(exchange="",routing_key="jzc",body="hello jzc,please update database......")

#6、关闭连接
mq_conn.close()
